var express = require('express'),
    router = express.Router();

router.get('/api/gelobal/siteinfo', function (req, res, next) {
    console.log("mock execute path： /mock/api/gelobal/siteinfo");
    res.json({'data': {'user': 'zhengyan', 'role': 'ADMIN', 'uid': 1, 'headTitle': 'ajax hello logo'}});
    return;
});

router.post('/api/auth/login', (req, res) => {
    debugger;
    const {userName, password} = req.body;
    console.log("mock execute path： api/auth/login username:" + userName + "    password:" + password);
    res.send({'data': {'authenticated': true, 'id': userName}});
});

module.exports = function () {
    return router;
};